package com.gz.DroidPong.Constants;

import org.anddev.andengine.extension.physics.box2d.PhysicsFactory;

import com.badlogic.gdx.physics.box2d.FixtureDef;

public class FixtureDefinitions {
	/* The categories. */
	public static final short CATEGORYBIT_WALL = 1;
	public static final short CATEGORYBIT_SPRITES = 2;
	public static final short CATEGORYBIT_BULLETS = 4;
	public static final short CATEGORYBIT_POWERUP = 8;
	public static final short CATEGORYBIT_GATE = 16;
	public static final short CATEGORYBIT_PLAYER = 32;
	public static final short CATEGORYBIT_SPAWNING = 64;
	public static final short CATEGORYBIT_NOTHING = 128;
	public static final short CATEGORYBIT_SPINNER = 256;

	/* And what should collide with what. */
	public static final short MASKBITS_WALL = CATEGORYBIT_WALL
			+ CATEGORYBIT_SPRITES + CATEGORYBIT_BULLETS + CATEGORYBIT_POWERUP
			+ CATEGORYBIT_GATE + CATEGORYBIT_PLAYER;
	public static final short MASKBITS_SPRITES = CATEGORYBIT_WALL
			+ CATEGORYBIT_BULLETS + CATEGORYBIT_SPRITES + CATEGORYBIT_PLAYER;
	public static final short MASKBITS_BULLETS = CATEGORYBIT_GATE
			+ CATEGORYBIT_SPRITES;
	public static final short MASKBITS_GATE = CATEGORYBIT_GATE
			+ CATEGORYBIT_BULLETS + CATEGORYBIT_WALL + CATEGORYBIT_PLAYER;
	public static final short MASKBITS_PLAYER = CATEGORYBIT_WALL
			+ CATEGORYBIT_GATE + CATEGORYBIT_SPRITES + CATEGORYBIT_SPINNER;
	public static final short MASKBITS_SPAWNING = CATEGORYBIT_WALL;
	public static final short MASKBITS_SPINNERS = CATEGORYBIT_WALL
			+ CATEGORYBIT_BULLETS + CATEGORYBIT_PLAYER;
	/* The fixtures. */
	public static final FixtureDef WALL_FIXTURE_DEF = PhysicsFactory
			.createFixtureDef(0, 0f, 0f, false, CATEGORYBIT_WALL,
					MASKBITS_WALL, (short) 0);
	public static final FixtureDef SPRITE_FIXTURE_DEF = PhysicsFactory
			.createFixtureDef(10, 0f, 10f, false, CATEGORYBIT_SPRITES,
					MASKBITS_SPRITES, (short) 0);
	public static final FixtureDef BULLET_FIXTURE_DEF = PhysicsFactory
			.createFixtureDef(.1f, 1f, 0f, false, CATEGORYBIT_BULLETS,
					MASKBITS_BULLETS, (short) 0);
	public static final FixtureDef POWERUP_FIXTURE_DEF = PhysicsFactory
			.createFixtureDef(.1F, 0f, 0f, false, CATEGORYBIT_SPRITES,
					MASKBITS_SPRITES, (short) 0);
	public static final FixtureDef GATE_FIXTURE_DEF = PhysicsFactory
			.createFixtureDef(100f, 1, 0, false, CATEGORYBIT_GATE,
					MASKBITS_GATE, (short) 0);
	public static final FixtureDef DNA_FIXTURE_DEF = PhysicsFactory
			.createFixtureDef(1f, 1, 1, false, CATEGORYBIT_GATE, MASKBITS_GATE,
					(short) 0);
	public static final FixtureDef PLAYER_FD = PhysicsFactory.createFixtureDef(
			1, 0, 0, false, CATEGORYBIT_PLAYER, MASKBITS_PLAYER, (short) 0);
	public static final FixtureDef SPAWNING_FD = PhysicsFactory
			.createFixtureDef(1, 0, 0, false, CATEGORYBIT_SPAWNING,
					MASKBITS_SPAWNING, (short) 0);
	public static final FixtureDef FD_NOTHING = PhysicsFactory
			.createFixtureDef(0, 0, 0, false, CATEGORYBIT_NOTHING,
					CATEGORYBIT_NOTHING, (short) 0);
	public static final FixtureDef SPINNER_FIXTURE_DEF = PhysicsFactory
			.createFixtureDef(10, 0f, 10f, false, CATEGORYBIT_SPINNER,
					MASKBITS_SPINNERS, (short) 0);

	public static final int USER_DATA_WALL = 0;
	public static final int USER_DATA_ENEMY = 1;
	public static final int USER_DATA_PLAYER = 2;
	public static final int USER_DATA_BULLET = 3;
}
